package com.ui.activity;

import com.core.sdk.utils.IntentUtil;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class OpenProjectListActivity extends ListActivity {
	ArrayAdapter<String> adapter = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		String[] items = { "http://www.eoeandroid.com/thread-321872-1-1.html", "http://www.csdn.net/article/2013-05-03/2815127-Android-open-source-projects",
				"http://www.csdn.net/article/2013-05-08/2815145-Android-open-source-projects-two", "http://www.csdn.net/article/2013-05-21/2815370-Android-open-source-projects-finale" };
		adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);
		setListAdapter(adapter);
	}

	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		super.onListItemClick(l, v, position, id);
		Intent intent = IntentUtil.createBrowserIntent(adapter.getItem(position));
		startActivity(intent);
	}
}
